<meta charset="UTF-8">
<script type="text/javascript" src="${basePath}/js/tds-dormancy.js"></script>
<#include "/component/pagination.html"/>
<table id="serverlist" class="table table-striped table-hover">
	<thead>
		<tr>
			<th width="20%" scope="col"><@spring.message code='server.name'/></th>
			<th width="20%" scope="col"><@spring.message code='server.managementaddr'/></th>
			<th width="20%" scope="col"><@spring.message code='server.publicaddr'/></th>
			<th width="20%" scope="col"><@spring.message code='server.status'/></th>
			<th width="20%" scope="col"><@spring.message code='server.operation'/></th>
		</tr>
	</thead>
	<tbody>
		<#list pager.list as item>
		<tr  
				<#if ((item_index+1) % 2 == 0) >class="oddrow"</#if> >
			<td name="name" value="${item.mgmtAddr}" >${item.name}</td>
	        <td>${item.mgmtAddr}</td>
	        <td>${item.pubAddr}</td>
	       <#if ('${item.status==0}') >
	        <td value="${item.status}" name="status"><@spring.message code='lun.available'/></td>
	        <td>
					<a class="btn btn-primary btn-xs btn-danger" onclick="server.operation('${item.mgmtAddr}','${item.status}',this)"><@spring.message code='server.dormancy'/></a>
	    	</td>
	    	</#if>
	    	<#if ('${item.status!=0}') >
	    	<td value="${item.status}" id="status" name="status"><@spring.message code='lun.unavailable'/></td>
	        <td>
					<a class="btn btn-primary btn-xs btn-success" onclick="server.operation('${item.mgmtAddr}','${item.status}',this)"><@spring.message code='server.disabled'/></a>
	    	</td>
	    	</#if>
	    </tr>
		</#list>
	</tbody>
</table>
<@pagination/>
